import componentsTitle from '@/constants/components/componentsTitle';

enum DeviceType {
  LEAK_MONITORING = '01',
  PRESSURE_MONITORING = '02',
  FLOW_MONITORING = '03',
  VIDEO_RESOURCES = '04'
}

export const MapDeviceTypes = (type: DeviceType) => {
  switch (type) {
    case DeviceType.LEAK_MONITORING:
      return componentsTitle.LEAK_MONITORING;
    case DeviceType.PRESSURE_MONITORING:
      return componentsTitle.PRESSURE_MONITORING;
    case DeviceType.FLOW_MONITORING:
      return componentsTitle.FLOW_MONITORING;
    case DeviceType.VIDEO_RESOURCES:
      return componentsTitle.REAL_TIME_MONITORING;
    default:
      throw new Error(`Unknown device type: ${type}`);
  }
};
